-- GENERATED SPELL FOR [Bloodmaul Drudger] --


function spell0_21238(pUnit, Event) --@Bloodmaul Buzz,Self--
pUnit:FullCastSpellOnTarget(34932,pUnit)
pUnit:RegisterEvent('Sorts_21238', 20281, 1)
end

function spell1_21238(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21238', 595, 1)
end

function spell2_21238(pUnit, Event) --@Puncture Armor,n/a--
pUnit:FullCastSpellOnTarget(35918,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21238', 30302, 1)
end

function Sorts_21238(pUnit, Event)
local choix_sorts_21238 = math.random(0, 2)
if choix_sorts_21238 == 0 then
pUnit:RegisterEvent('spell0_21238', 1, 1)
end
if choix_sorts_21238 == 1 then
pUnit:RegisterEvent('spell1_21238', 1, 1)
end
if choix_sorts_21238 == 2 then
pUnit:RegisterEvent('spell2_21238', 1, 1)
end
end

function mob21238_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21238', math.random(1500, 3000), 1)
end

function mob21238_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21238_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21238_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21238, 1, 'mob21238_Action')
RegisterUnitEvent(21238, 2, 'mob21238_Leave')
RegisterUnitEvent(21238, 3, 'mob21238_Kill')
RegisterUnitEvent(21238, 4, 'mob21238_Die')
